package com.fan.shop.services;

import java.util.List;

import com.fan.shop.domain.Category;

public interface CategoryService extends ShopService {

	public Category getCategory(String name);
	
	public Category getCategory(Integer id);

	public List<Category> getAllCategories();

	public int getSize();

	public void addCategory(Category category);

	public void updateCategory(Category category);

	public void deleteCategory(Category category);

	public boolean hasCategory(String name);

	public boolean isParent(Category category);

	public List<Category> getSubCategories(Category category);

	public boolean isLeaf(Category category);

	public List<Category> getRootCategories();

	public boolean isLastLevelFolder(Category category);
	
	public String getCategoryNameByID(Integer id);
	
	public Category getCategoryByName(String name);
}
